import type * as T from './type'
import http from '@/utils/http'
const BASE_URL = '/system/examination'
/** @desc 查询列表 */
export function listExamination(query: T.ExaminationQuery) {
  return http.get<PageRes<T.ExaminationPageQuery[]>>(`${BASE_URL}/page`, query)
}
export function recyclePages(query: T.ExaminationQuery) {
  return http.get<PageRes<T.ExaminationPageQuery[]>>(`${BASE_URL}/recyclePage`, query)
}

/** @desc 根據單元編號查询集合 */
export function getByUnitIdExaminations(query: any) {
  return http.get<T.ExaminationDto[]>(`${BASE_URL}/list`,query)
}


/** @desc 查询详情 */
export function getExamination(id: string) {
  return http.get<T.ExaminationDto>(`${BASE_URL}/getData/${id}`)
}

/** @desc 新增 */
export function addExamination(data: any) {
  return http.post(`${BASE_URL}/create`, data)
}

/** @desc 修改 */
export function updateExamination(data: any) {
  return http.post(`${BASE_URL}/modify`, data)
}

/** @desc 逻辑删除 */
export function logicDeleteExamination(ids: string | Array<string>) {
  return http.del(`${BASE_URL}/logicDeleteExamination/${ids}`)
}

/** @desc 删除 */
export function deleteExamination(ids: string | Array<string>) {
  return http.del(`${BASE_URL}/delete/${ids}`)
}


